Skip to content

fix(cloudflare): Route DO teardown through original waitUntil#22339

Merged
isaacs merged 1 commit into
developfrom
isaacs/fix-22328-a
Jul 17, 2026
Merged

fix(cloudflare): Route DO teardown through original waitUntil#22339
isaacs merged 1 commit into
developfrom
isaacs/fix-22328-a

Conversation

@isaacs

@isaacs isaacs commented Jul 16, 2026

Copy link
Copy Markdown
Member

Avoid a flush-lock deadlock that prevents WebSocket hibernation.

fix: #22328
fix: JS-3067

fix: #21153
fix: JS-2607

@isaacs
isaacs requested a review from a team as a code owner July 16, 2026 23:51
@isaacs
isaacs requested review from JPeer264, andreiborza and mydea and removed request for a team July 16, 2026 23:51
@linear-code

linear-code Bot commented Jul 16, 2026

Copy link
Copy Markdown

JS-3067

JS-2607

Avoid a flush-lock deadlock that prevents WebSocket hibernation.

fix: #22328
fix: JS-3067
@isaacs
isaacs force-pushed the isaacs/fix-22328-a branch from 82884e7 to 11eb627 Compare July 16, 2026 23:54

@JPeer264 JPeer264 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing thank you.

By any chance did you find a way to reproduce this in the deployed version? I wonder if there is a reliable way for us to replicate that in wrangler tests or in a prod instance.

@isaacs

isaacs commented Jul 17, 2026

Copy link
Copy Markdown
Member Author

By any chance did you find a way to reproduce this in the deployed version? I wonder if there is a reliable way for us to replicate that in wrangler tests or in a prod instance.

No, but to be fair, I didn't try very hard. It was clear from reading the code and the synthetic test that it could happen this way, and the report in #22328 makes it clear it is happening for at least some users. It sounds like it only occurs under load, so I figured it might be tricky to reproduce organically.

@isaacs
isaacs merged commit 46e7bc8 into develop Jul 17, 2026
90 checks passed
@isaacs
isaacs deleted the isaacs/fix-22328-a branch July 17, 2026 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants